import request from '@/utils/request'

// 查询借阅登记列表
export function listFileBorrowingRegistration(query) {
  return request({
    url: '/business/fileBorrowingRegistration/list',
    method: 'get',
    params: query
  })
}

// 查询借阅登记详细
export function getFileBorrowingRegistration(id) {
  return request({
    url: '/business/fileBorrowingRegistration/' + id,
    method: 'get'
  })
}

// 新增借阅登记
export function addFileBorrowingRegistration(data) {
  return request({
    url: '/business/fileBorrowingRegistration',
    method: 'post',
    data: data
  })
}

// 修改借阅登记
export function updateFileBorrowingRegistration(data) {
  return request({
    url: '/business/fileBorrowingRegistration',
    method: 'put',
    data: data
  })
}

// 归还
export function restitution(data) {
  return request({
    url: '/business/fileBorrowingRegistration/restitution',
    method: 'put',
    data: data
  })
}

// 删除借阅登记
export function delFileBorrowingRegistration(id) {
  return request({
    url: '/business/fileBorrowingRegistration/' + id,
    method: 'delete'
  })
}

// 导出借阅登记
export function exportFileBorrowingRegistration(query) {
  return request({
    url: '/business/fileBorrowingRegistration/export',
    method: 'get',
    params: query
  })
}
